12.Registry Hives Extraction FTK
π§ General Introduction
After learning about the concepts of Preservation and Acquisition, it's now time to start working hands-on with one of the most important components of Windows operating systems: the Registry.
The Registry is a database that stores system, user, and application settings.
π§© What is the Registry?
The Registry is a central database that contains critical information related to:
-
System Configuration
-
Users
-
Applications
-
Hardware
This data is stored inside files known as Hives.
π Historical Note:
Before the release of Windows 95, system settings were stored in
.inifiles.\ From Windows 95 onwards, Microsoft adopted the Registry to store system data in a more organized and secure way.
ποΈ Main Types of Registry Hives
When you open the Registry Editor by typing regedit in the Start menu, you'll see five main Hives:
| Hive | Description |
|---|---|
| HKEY_CLASSES_ROOT | Information about file extensions and their program associations. |
| HKEY_CURRENT_USER | Settings for the current user only (e.g., desktop, themesβ¦). |
| HKEY_LOCAL_MACHINE | System settings, installed software, and hardware configurations. |
| HKEY_USERS | Info about all users who have previously logged in. |
| HKEY_CURRENT_CONFIG | Information about currently used hardware. |
The most commonly used Hives are:
HKEY_CURRENT_USER,HKEY_LOCAL_MACHINE, andHKEY_USERS
π HKEY_CURRENT_USER is linked to the file NTUSER.DAT
πΎ Where Registry Hive Files Are Stored in the System
The Hives are actual files stored in fixed locations on the system, such as:
C:\Users\[Username]\NTUSER.DAT\ β³ represents HKEY_CURRENT_USER
- Files like:
SAM,SECURITY,SOFTWARE,SYSTEM\ β³ located in:
C:\Windows\System32\Config\
Each file represents a different Hive and must be collected along with its associated
.LOG1and.LOG2files.
β οΈ Issue with Manually Copying Registry Files
When trying to manually copy registry files while the system is running (like NTUSER.DAT), several issues occur:
-
Files are protected by the system.
-
They are constantly updated using Transaction Logs (temporary files that later merge into the original).
π So: direct copy = β Dirty Hive = Incomplete file
π οΈ Extracting Registry Hives Using FTK Imager
πΈ Method 1: Live Acquisition from the System
-
Open FTK Imager
-
Choose
Add Evidence ItemorAdd All Attached Devices
-
Select
Physical Driveβ Choose the OS drive -
FTK shows all files, even protected ones
-
Navigate to:
-
C:\Users\[User]to extractNTUSER.DATandLOG1/LOG2files -
C:\Windows\System32\Configto extract the remaining Hives
π Orphan files: have no reference in the file system\ πUnallocated space: free disk space that might contain remnants of deleted files
If you copy
NTUSER.DATwithout the LOG files, you'll get a Dirty Hive.
To extract all Hives:
-
You can extract them one by one from the path:
\Windows\System32\Config\ -
Or use the Obtain Protected Files feature
πΈ Method 2: Extracting Hives from an Image File
If you have a forensic image (like .E01, .dd):
-
Open FTK Imager
-
Choose
Add Evidence Item -
Select
Image File -
Load the disk image
-
Browse the same paths and extract the required files:
-
C:\Users\[Username]βNTUSER.DAT -
C:\Windows\System32\Config\βSAM,SYSTEM,SOFTWARE,SECURITY,DEFAULT
π§² Hive File Types You Should Extract:
| File Name | Represents Which Hive? |
|---|---|
NTUSER.DAT |
HKEY_CURRENT_USER |
SAM |
User account information |
SYSTEM |
System configuration |
SOFTWARE |
Installed software |
SECURITY |
Security settings |
DEFAULT |
Default User settings |
π§Ύ Importance of Transaction Logs
-
While the system is running, changes aren't written directly to the Hive files.
-
They are temporarily stored in
.LOG1and.LOG2files to protect the main files from corruption. -
They are later automatically merged.
Therefore, ignoring these files = Incomplete files = β Dirty Hive
Obtain Protected Files
β Best Way to Fully Extract Hives via FTK Imager
Instead of manually extracting files:
-
Use the β Obtain Protected Files option
-
Extracts all protected files at once
-
Automatically includes Transaction Log files
-
Youβll need to specify where to save the extraction:
- Since we want everything that happened on Windows:
- Youβll find it extracted:
SOFTWARE,SYSTEM,SAM,DEFAULT,SECURITY
All of them are located under Local Machine
Since we selected "everything", it also gathers all users, including
NTUSERandUsrClass
Extracting Hives from an Image File
If you have a .E01 or .dd image:
Add Evidence Item β Image File
- Add it to FTK Imager as an Image File
-
Browse it like a real drive
-
Extract Registry files the same way
Browse the same paths:
-
C:\Users\[User]βNTUSER.DAT -
C:\Windows\System32\Config\β remaining Hives
βοΈ Very useful for analyzing a system without booting it.
π§ Analytical Notes
-
Registry files = a mini-database for every part of the system or user.
-
Transaction Logs = intermediary files to protect data.
-
FTK Imager can display protected files not visible in Windows.
-
After extraction, we use tools like:
-
Registry Explorer -
RECmd -
Regripper
π§Ύ Summary
| Section | Content |
|---|---|
| Registry Definition | A database storing system and user settings |
| Main Hives | CLASSES_ROOT, CURRENT_USER, LOCAL_MACHINE, USERS, CURRENT_CONFIG |
| Storage Locations | C:\Users\[User]\NTUSER.DAT and C:\Windows\System32\Config |
| Extraction Method | Using FTK Imager β from live system or forensic image |
| Important Notes | Cannot manually copy Hives while system is running β specialized tools are needed for completeness |